/*
 * Copyright (c) 2015 /5 /17
 * 	      9 :44 : 37
 *               By：wupeiji
 *               Q  Q：757671834
 * 	      It is not easy to meet each other in such a big world
 */

package spring.security.maven.serviceImp;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Service;
import spring.security.maven.dao.CountryMapper;
import spring.security.maven.daomain.Country;
import spring.security.maven.service.CountryService;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by wpj on 2015/5/17.
 * 作者：吴培基
 */
@Service
public class CountryServiceImpl implements CountryService{
@Resource
private CountryMapper countryMapper;

    /**
     *
     * @param page_Num 第几页
     * @param page_Size 每页的大小
     * @return
     */
    public PageInfo<Country> selectByPage(int page_Num, int page_Size) {
        PageHelper.startPage(page_Num,page_Size);
        List<Country> list=countryMapper.selectAll();
        PageInfo<Country> pageInfo=new PageInfo<Country>(list);
        System.out.println("结果"+list.toString());
        return pageInfo;
    }

    public List<Country> selectAll(RowBounds rowBounds) {
        return null;
    }
}
